package string;

import java.util.Scanner;

/**
 * char charAt(int index)
 *提取指定位置上的字符
 */

public class CharAtDemo {
    static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        System.out.println("输入一段");
        String str = sc.next();
        for (int i = 0,s=str.length()-1; i<str.length()/2;i++,s--){
            if (str.charAt(i)!=str.charAt(s)){
                System.out.println("不是回文");
                return;
            }
        }
            System.out.println("是回文");
    }
}
